Calculate the rotational inertia